package com.kifas.model.xml;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author brainmaster
 * 
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PembelianModel implements Serializable {

	private static final long serialVersionUID = 1469594810240287022L;

	private Long idPembelian;

	private String nomorPo;

	private Date tanggal;

	private boolean kirim;

	private String keterangan;

	private boolean pajak;

	private boolean closed;

	private BigDecimal total;

	private BigDecimal biayaLain;

	@XmlElement(name = "supplierModel", type = SupplierModel.class)
	private SupplierModel suplier;

	private Date tanggalJatuhTempo;

	private String nomorKontrakPembelian;

	private Set<PembelianDetailModel> pembelianDetailModels;

	private String createdBy;

	private Date createdDate;

	public PembelianModel() {
	}

	public PembelianModel(Long idPembelian, String nomorPo, Date tanggal, boolean kirim, String keterangan, boolean pajak, boolean closed, BigDecimal total,
			BigDecimal biayaLain, SupplierModel suplier, Date tanggalJatuhTempo, String nomorKontrakPembelian, String createdBy, Date createdDate) {
		this.idPembelian = idPembelian;
		this.nomorPo = nomorPo;
		this.tanggal = tanggal;
		this.kirim = kirim;
		this.keterangan = keterangan;
		this.pajak = pajak;
		this.closed = closed;
		this.total = total;
		this.biayaLain = biayaLain;
		this.suplier = suplier;
		this.tanggalJatuhTempo = tanggalJatuhTempo;
		this.nomorKontrakPembelian = nomorKontrakPembelian;
		this.createdBy = createdBy;
		this.createdDate = createdDate;
	}

	public PembelianModel(Long idPembelian, String nomorPo, Date tanggal, boolean kirim, String keterangan, boolean pajak, boolean closed, BigDecimal total,
			BigDecimal biayaLain, SupplierModel suplier, Date tanggalJatuhTempo, String nomorKontrakPembelian, Set<PembelianDetailModel> pembelianDetailModels,
			String createdBy, Date createdDate) {
		this.idPembelian = idPembelian;
		this.nomorPo = nomorPo;
		this.tanggal = tanggal;
		this.kirim = kirim;
		this.keterangan = keterangan;
		this.pajak = pajak;
		this.closed = closed;
		this.total = total;
		this.biayaLain = biayaLain;
		this.suplier = suplier;
		this.tanggalJatuhTempo = tanggalJatuhTempo;
		this.nomorKontrakPembelian = nomorKontrakPembelian;
		this.pembelianDetailModels = pembelianDetailModels;
		this.createdBy = createdBy;
		this.createdDate = createdDate;
	}

	public Long getIdPembelian() {
		return idPembelian;
	}

	public void setIdPembelian(Long idPembelian) {
		this.idPembelian = idPembelian;
	}

	public String getNomorPo() {
		return nomorPo;
	}

	public void setNomorPo(String nomorPo) {
		this.nomorPo = nomorPo;
	}

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

	public boolean isKirim() {
		return kirim;
	}

	public void setKirim(boolean kirim) {
		this.kirim = kirim;
	}

	public String getKeterangan() {
		return keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}

	public boolean isPajak() {
		return pajak;
	}

	public void setPajak(boolean pajak) {
		this.pajak = pajak;
	}

	public boolean isClosed() {
		return closed;
	}

	public void setClosed(boolean closed) {
		this.closed = closed;
	}

	public Set<PembelianDetailModel> getPembelianDetailModels() {
		return pembelianDetailModels;
	}

	public void setPembelianDetailModels(Set<PembelianDetailModel> pembelianDetailModels) {
		this.pembelianDetailModels = pembelianDetailModels;
	}

	public void setSuplier(SupplierModel suplier) {
		this.suplier = suplier;
	}

	public SupplierModel getSuplier() {
		return suplier;
	}

	public void setTanggalJatuhTempo(Date tanggalJatuhTempo) {
		this.tanggalJatuhTempo = tanggalJatuhTempo;
	}

	public Date getTanggalJatuhTempo() {
		return tanggalJatuhTempo;
	}

	public void setNomorKontrakPembelian(String nomorKontrakPembelian) {
		this.nomorKontrakPembelian = nomorKontrakPembelian;
	}

	public String getNomorKontrakPembelian() {
		return nomorKontrakPembelian;
	}

	public BigDecimal getTotal() {
		return total;
	}

	public void setTotal(BigDecimal total) {
		this.total = total;
	}

	public BigDecimal getBiayaLain() {
		return biayaLain;
	}

	public void setBiayaLain(BigDecimal biayaLain) {
		this.biayaLain = biayaLain;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

}
